home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 2.2 KB | 75 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: SLGrUtil.h
- // Release Version: $ ODF 2 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef SLGRUTIL_H
- #define SLGRUTIL_H
-
- #ifndef FWSTDDEF_H
- #include "FWStdDef.h"
- #endif
-
- #ifndef SLPTRECT_H
- #include "SLPtRect.h"
- #endif
-
- #ifndef FWFXMATH_H
- #include "FWFxMath.h"
- #endif
-
- //========================================================================================
- // Forward Declarations
- //========================================================================================
-
- struct FW_SPoint;
- struct FW_SRect;
- class ODShape;
-
- //========================================================================================
- // Extern C Methods
- //========================================================================================
-
- // Export or Import functions for CFM-68K [sfu]
-
- #if defined(FW_ODFLIB_IMPORT)
- #pragma import on
- #elif defined(FW_ODFLIB)
- #pragma export on
- #endif
-
- FW_EXTERN_C_BEGIN
-
- // ----- Region Code -----
- short SL_API FW_RegionCode(const FW_SPoint& line, const FW_SRect& rect);
-
- // ----- Hit testing utilities -----
-
- FW_Boolean SL_API FW_PtInOval(const FW_SRect& ovalRect, const FW_SPoint& test);
- FW_Boolean SL_API FW_PtInRoundRect(const FW_SRect& rect, const FW_SPoint& ovalSize, const FW_SPoint& test);
- FW_Boolean SL_API FW_HitTestLine(const FW_SPoint& pt1, const FW_SPoint& pt2, const FW_SPoint& test, FW_Fixed tolerance);
- FW_Boolean SL_API FW_HitTestPolygon(long pointCount, const FW_SPoint* points, const FW_SPoint& point);
-
- // ----- Debugging -----
-
- FW_EXPORT void SL_API FW_LogPoint(Environment* ev, const char* prompt, const FW_SPoint& point);
- FW_EXPORT void SL_API FW_LogRect(Environment* ev, const char* prompt, const FW_SRect& rect);
- FW_EXPORT void SL_API FW_LogShape(Environment* ev, const char* prompt, ODShape* shape);
- FW_EXPORT void SL_API FW_LogTransform(Environment* ev, const char* prompt, ODTransform* transform);
-
- FW_EXTERN_C_END
-
- // For CFM-68K [sfu]
-
- #if defined(FW_ODFLIB_IMPORT)
- #pragma import off
- #elif defined(FW_ODFLIB)
- #pragma export off
- #endif
-
- #endif
-